<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>音乐上传</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
    <style>
        body {
            font-family: 'Arial', sans-serif;
            background-color: #cbdee7;
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            color: #fff;
        }
        .container {
            width: 400px;
            padding: 40px;
            background-color: #7db2e7;
            border-radius: 10px;
            box-shadow: 0 10px 20px rgba(255, 252, 252, 0.3);
            text-align: center;
            position: relative;
        }
        h1 {
            font-size: 36px;
            margin-bottom: 20px;
            text-transform: uppercase;
        }
        form {
            display: flex;
            flex-direction: column;
            align-items: center;
        }
        label {
            margin-bottom: 10px;
            font-size: 18px;
        }
        input[type="file"], input[type="text"], input[type="submit"] {
            padding: 10px 20px;
            margin-bottom: 20px;
            border: none;
            border-radius: 5px;
            font-size: 16px;
            background-color: #ffffff;
            color: #060505;
            cursor: pointer;
            transition: background-color 0.3s;
        }
        input[type="file"]:hover, input[type="text"]:hover, input[type="submit"]:hover {
            background-color: #edeeee;
        }
        input[type="submit"] {
            width: 100%;
        }
        input[type="file"], input[type="text"] {
            width: 100%;
            box-sizing: border-box;
        }
        .fas {
            position: absolute;
            top: 20px;
            right: 20px;
            font-size: 24px;
            color: #fff;
            cursor: pointer;
            transition: color 0.3s;
        }
        .fas:hover {
            color: #ff0066;
        }
    </style>
</head>
<body>
<div class="container">
    <i id="cha" class="fas fa-times"></i>

    <h1>音乐上传</h1>
    <form method="post" enctype="multipart/form-data" action="/music/upload">

        <input type="file" name="file" id="file" accept=".mp3,.wav" required>
        <input type="text" name="singer" id="singer" placeholder="请输入歌手名" required>
        <input type="submit" value="上传">
    </form>
</div>
<script src="js/jquery-3.1.1.min.js"></script>
<script>
    $(function (){
        $("#cha").click( function () {
            alert("上传成功!即将跳转");
            location.assign("list.html")
        });
    });

</script>
</body>
</html>
